package com.android.mangalib.object;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Tome {

	private String title;
	
	private Date publication_date;
	
	private float price;
	
	private boolean owned;
	
	public Tome() {
		
	}
	
	public Tome(String title, String publication_date, String price, String owned) throws ParseException {
		
		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
	
		this.title = title;
		this.publication_date = sdf.parse(publication_date);
		this.price = Float.valueOf(price);
		this.owned = Boolean.valueOf(owned);
	}

	public Tome(String title) {
		this.title = title;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getPublication_date() {
		return publication_date;
	}

	public void setPublication_date(Date publicationDate) {
		publication_date = publicationDate;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public boolean isOwned() {
		return owned;
	}

	public void setOwned(boolean owned) {
		this.owned = owned;
	}

	@Override
	public String toString() {
		return "Tome [title=" + title + ", publication_date="
				+ publication_date + "]";
	}
	
	

}
